/* 全局基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #f5f7fa;
  color: #303133;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100vh;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

/* Element Plus 样式优化 */
.el-card {
  border-radius: 12px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.08);
  border: none;
}
.el-card__header {
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 20px;
}
.el-card__body {
  padding: 20px;
}
.el-button {
  border-radius: 8px;
  font-weight: 500;
}
.el-button--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}
.el-button--primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}
.el-input__wrapper, .el-select .el-input__wrapper {
  border-radius: 8px;
}
.el-table {
  border-radius: 8px;
  overflow: hidden;
}
.el-table th {
  background: #fafafa;
  font-weight: 600;
}
.el-menu {
  border: none;
}
.el-menu-item {
  border-radius: 8px;
  margin: 4px 8px;
}
.el-menu-item.is-active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.el-progress-bar__outer, .el-progress-bar__inner {
  border-radius: 10px;
}
.el-tag {
  border-radius: 6px;
  font-weight: 500;
}
.el-dialog {
  border-radius: 12px;
}
.el-dialog__header {
  border-bottom: 1px solid #f0f0f0;
  padding: 20px 20px 16px;
}
.el-dialog__body {
  padding: 20px;
}
.el-dialog__footer {
  border-top: 1px solid #f0f0f0;
  padding: 16px 20px 20px;
}

/* 动画效果 */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}
.fade-enter-from, .fade-leave-to {
  opacity: 0;
}
.slide-enter-active, .slide-leave-active {
  transition: transform 0.3s ease;
}
.slide-enter-from {
  transform: translateX(-100%);
}
.slide-leave-to {
  transform: translateX(100%);
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .stats-row, .charts-row, .bottom-row, .realtime-cards, .charts-section {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 768px) {
  .action-bar {
    flex-direction: column;
    gap: 12px;
  }
  .search-box {
    width: 100%;
    margin-left: 0;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.p-8 { padding: 8px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.shadow { box-shadow: 0 2px 12px 0 rgba(0,0,0,0.08); }
.shadow-lg { box-shadow: 0 4px 20px 0 rgba(0,0,0,0.15); }

/* 状态色 */
.status-success { color: #67C23A; }
.status-warning { color: #E6A23C; }
.status-error { color: #F56C6C; }
.status-info { color: #409EFF; }

/* 加载和空状态 */
.loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #909399;
}
.empty-state .el-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state .title {
  font-size: 16px;
  margin-bottom: 8px;
}
.empty-state .desc {
  font-size: 14px;
  opacity: 0.8;
}
